#pragma once
#include "PipeMessage.h"

#include <string>
#include <Windows.h>

using namespace std;
class CreateUserMessage : public PipeMessage
{
public:
	typedef struct
	{
		char username[15];
		char password[15];
		int result;
	}CreateUserMsgData;

private:
	CreateUserMsgData mData;
	

protected:
	virtual UINT CreateBuffer(UINT _startPos = 0);
	virtual void ParseBuffer();
	virtual UINT GetBufferSize();

public:
	CreateUserMessage(BYTE* _buff = NULL);

public:
	

	void SetData(string _username, string _password);
	void SetResult(int _result);
	
	const CreateUserMsgData& Data() const { return mData; }
};

